package com.zmn.plat.services.interfaces.part;

import java.util.List;

import com.zmn.common.dto.VtDTO;
import com.zmn.mcc.cas.model.LoginStaff;
import com.zmn.plat.model.entity.part.PartCategory;
import com.zmn.plat.model.entity.part.PartCategoryQuery;

public interface PartCategoryService {
    PartCategory findByKey(Integer id);

    List<PartCategory> listPageByQuery(PartCategoryQuery query);

    /**
     * 描述:返回配件分类简单列表 使用缓存 失效时间1h
     *
     * @param parentId
     *            Integer
     * @return List<VtDTO>
     * @author DaiZhichao
     * @since 2018/12/14 12:00
     */
    List<VtDTO> getPartCategorySimpleList(Integer parentId);

    List<PartCategory> listByParentId(Integer parentId, Short status);

    List<PartCategory> listByQuery(PartCategoryQuery query);

    Integer countByQuery(PartCategoryQuery query);

    Integer updateByKey(PartCategory entity, LoginStaff mcStaff);

    Integer updateStatus(Integer categId, Short status, String updater);

    Integer updateStatusBatch(List<Integer> categIds, Integer status, String updater);

    Integer updateSort(Integer categId, Integer sort);

    Integer insert(PartCategory entity, LoginStaff mcStaff);

    void deleteByKey(Integer categId);
}
